<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkDevicePad: GDK 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK 3 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="GdkDevice.html" title="GdkDevice">
<link rel="next" href="gdk3-Points-Rectangles-and-Regions.html" title="Points and Rectangles">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GdkDevicePad.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GdkDevicePad.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites">  <span class="dim">|</span> 
                  <a href="#GdkDevicePad.prerequisites" class="shortcut">Prerequisites</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GdkDevice.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdk3-Points-Rectangles-and-Regions.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GdkDevicePad"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GdkDevicePad.top_of_page"></a>GtkDevicePad</span></h2>
<p>GtkDevicePad — Pad device interface</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GdkDevicePad.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevicePad.html#gdk-device-pad-get-n-groups" title="gdk_device_pad_get_n_groups ()">gdk_device_pad_get_n_groups</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevicePad.html#gdk-device-pad-get-group-n-modes" title="gdk_device_pad_get_group_n_modes ()">gdk_device_pad_get_group_n_modes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevicePad.html#gdk-device-pad-get-n-features" title="gdk_device_pad_get_n_features ()">gdk_device_pad_get_n_features</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GdkDevicePad.html#gdk-device-pad-get-feature-group" title="gdk_device_pad_get_feature_group ()">gdk_device_pad_get_feature_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDevicePad.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GdkDevicePad.html#GdkDevicePad-struct" title="GdkDevicePad">GdkDevicePad</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GdkDevicePad.html#GdkDevicePadFeature" title="enum GdkDevicePadFeature">GdkDevicePadFeature</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDevicePad.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
    <span class="lineart">╰──</span> GdkDevicePad
</pre>
</div>
<div class="refsect1">
<a name="GdkDevicePad.prerequisites"></a><h2>Prerequisites</h2>
<p>
GdkDevicePad requires
 <a class="link" href="GdkDevice.html" title="GdkDevice">GdkDevice</a>.</p>
</div>
<div class="refsect1">
<a name="GdkDevicePad.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk/gdk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GdkDevicePad.description"></a><h2>Description</h2>
<p><a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a> is an interface implemented by devices of type
<a class="link" href="GdkDevice.html#GDK-SOURCE-TABLET-PAD:CAPS"><code class="literal">GDK_SOURCE_TABLET_PAD</code></a>, it allows querying the features provided
by the pad device.</p>
<p>Tablet pads may contain one or more groups, each containing a subset
of the buttons/rings/strips available. <a class="link" href="GdkDevicePad.html#gdk-device-pad-get-n-groups" title="gdk_device_pad_get_n_groups ()"><code class="function">gdk_device_pad_get_n_groups()</code></a>
can be used to obtain the number of groups, <a class="link" href="GdkDevicePad.html#gdk-device-pad-get-n-features" title="gdk_device_pad_get_n_features ()"><code class="function">gdk_device_pad_get_n_features()</code></a>
and <a class="link" href="GdkDevicePad.html#gdk-device-pad-get-feature-group" title="gdk_device_pad_get_feature_group ()"><code class="function">gdk_device_pad_get_feature_group()</code></a> can be combined to find out the
number of buttons/rings/strips the device has, and how are they grouped.</p>
<p>Each of those groups have different modes, which may be used to map
each individual pad feature to multiple actions. Only one mode is
effective (current) for each given group, different groups may have
different current modes. The number of available modes in a group can
be found out through <a class="link" href="GdkDevicePad.html#gdk-device-pad-get-group-n-modes" title="gdk_device_pad_get_group_n_modes ()"><code class="function">gdk_device_pad_get_group_n_modes()</code></a>, and the current
mode for a given group will be notified through the <a class="link" href="gdk3-Event-Structures.html#GdkEventPadGroupMode" title="struct GdkEventPadGroupMode"><span class="type">GdkEventPadGroupMode</span></a>
event.</p>
</div>
<div class="refsect1">
<a name="GdkDevicePad.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-device-pad-get-n-groups"></a><h3>gdk_device_pad_get_n_groups ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_device_pad_get_n_groups (<em class="parameter"><code><a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a> *pad</code></em>);</pre>
<p>Returns the number of groups this pad device has. Pads have
at least one group. A pad group is a subcollection of
buttons/strip/rings that is affected collectively by a same
current mode.</p>
<div class="refsect3">
<a name="gdk-device-pad-get-n-groups.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pad</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-pad-get-n-groups.returns"></a><h4>Returns</h4>
<p> The number of button/ring/strip groups in the pad.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-pad-get-group-n-modes"></a><h3>gdk_device_pad_get_group_n_modes ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_device_pad_get_group_n_modes (<em class="parameter"><code><a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a> *pad</code></em>,
                                  <em class="parameter"><code><span class="type">gint</span> group_idx</code></em>);</pre>
<p>Returns the number of modes that <em class="parameter"><code>group</code></em>
 may have.</p>
<div class="refsect3">
<a name="gdk-device-pad-get-group-n-modes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pad</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>group_idx</p></td>
<td class="parameter_description"><p>group to get the number of available modes from</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-pad-get-group-n-modes.returns"></a><h4>Returns</h4>
<p> The number of modes available in <em class="parameter"><code>group</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-pad-get-n-features"></a><h3>gdk_device_pad_get_n_features ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_device_pad_get_n_features (<em class="parameter"><code><a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a> *pad</code></em>,
                               <em class="parameter"><code><a class="link" href="GdkDevicePad.html#GdkDevicePadFeature" title="enum GdkDevicePadFeature"><span class="type">GdkDevicePadFeature</span></a> feature</code></em>);</pre>
<p>Returns the number of features a tablet pad has.</p>
<div class="refsect3">
<a name="gdk-device-pad-get-n-features.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pad</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>feature</p></td>
<td class="parameter_description"><p>a pad feature</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-pad-get-n-features.returns"></a><h4>Returns</h4>
<p> The amount of elements of type <em class="parameter"><code>feature</code></em>
that this pad has.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-pad-get-feature-group"></a><h3>gdk_device_pad_get_feature_group ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_device_pad_get_feature_group (<em class="parameter"><code><a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a> *pad</code></em>,
                                  <em class="parameter"><code><a class="link" href="GdkDevicePad.html#GdkDevicePadFeature" title="enum GdkDevicePadFeature"><span class="type">GdkDevicePadFeature</span></a> feature</code></em>,
                                  <em class="parameter"><code><span class="type">gint</span> feature_idx</code></em>);</pre>
<p>Returns the group the given <em class="parameter"><code>feature</code></em>
 and <em class="parameter"><code>idx</code></em>
 belong to,
or -1 if feature/index do not exist in <em class="parameter"><code>pad</code></em>
.</p>
<div class="refsect3">
<a name="gdk-device-pad-get-feature-group.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pad</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDevicePad.html" title="GtkDevicePad"><span class="type">GdkDevicePad</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>feature</p></td>
<td class="parameter_description"><p>the feature type to get the group from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>feature_idx</p></td>
<td class="parameter_description"><p>the index of the feature to get the group from</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-pad-get-feature-group.returns"></a><h4>Returns</h4>
<p> The group number of the queried pad feature.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="GdkDevicePad.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkDevicePad-struct"></a><h3>GdkDevicePad</h3>
<pre class="programlisting">typedef struct _GdkDevicePad GdkDevicePad;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GdkDevicePadFeature"></a><h3>enum GdkDevicePadFeature</h3>
<p>A pad feature.</p>
<div class="refsect3">
<a name="GdkDevicePadFeature.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDK-DEVICE-PAD-FEATURE-BUTTON:CAPS"></a>GDK_DEVICE_PAD_FEATURE_BUTTON</p></td>
<td class="enum_member_description">
<p>a button</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-DEVICE-PAD-FEATURE-RING:CAPS"></a>GDK_DEVICE_PAD_FEATURE_RING</p></td>
<td class="enum_member_description">
<p>a ring-shaped interactive area</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-DEVICE-PAD-FEATURE-STRIP:CAPS"></a>GDK_DEVICE_PAD_FEATURE_STRIP</p></td>
<td class="enum_member_description">
<p>a straight interactive area</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>